<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>原子习惯 - 登录/注册</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
  <link rel="stylesheet" href="css/styles.css">
</head>
<body>
  <div class="container">
    <div class="status-bar">
      <div class="time">9:41</div>
      <div class="icons">
        <i class="fas fa-signal"></i>
        <i class="fas fa-wifi"></i>
        <i class="fas fa-battery-full"></i>
      </div>
    </div>
    
    <div class="screen-container">
      <div class="text-center mb-20">
        <h1 style="color: var(--primary-color);">原子习惯</h1>
        <p>基于科学方法养成好习惯</p>
      </div>
      
      <div class="card">
        <ul class="nav nav-tabs">
          <li class="active"><a href="#login" data-toggle="tab">登录</a></li>
          <li><a href="#signup" data-toggle="tab">注册</a></li>
        </ul>
        
        <!-- Login Form -->
        <div class="tab-content">
          <div class="tab-pane active" id="login">
            <form id="loginForm">
              <div class="form-group">
                <label class="form-label" for="loginEmail">电子邮箱</label>
                <input type="email" class="form-control" id="loginEmail" placeholder="your@email.com" required>
              </div>
              
              <div class="form-group">
                <label class="form-label" for="loginPassword">密码</label>
                <input type="password" class="form-control" id="loginPassword" placeholder="******" required>
              </div>
              
              <div class="text-center mb-10">
                <a href="#" class="text-primary">忘记密码？</a>
              </div>
              
              <button type="submit" class="btn btn-primary btn-block">登录</button>
            </form>
          </div>
          
          <!-- Signup Form -->
          <div class="tab-pane" id="signup">
            <form id="signupForm">
              <div class="form-group">
                <label class="form-label" for="signupName">姓名</label>
                <input type="text" class="form-control" id="signupName" placeholder="请输入姓名" required>
              </div>
              
              <div class="form-group">
                <label class="form-label" for="signupEmail">电子邮箱</label>
                <input type="email" class="form-control" id="signupEmail" placeholder="your@email.com" required>
              </div>
              
              <div class="form-group">
                <label class="form-label" for="signupPassword">密码</label>
                <input type="password" class="form-control" id="signupPassword" placeholder="******" required>
              </div>
              
              <div class="form-group">
                <label class="form-label" for="signupPassword2">确认密码</label>
                <input type="password" class="form-control" id="signupPassword2" placeholder="******" required>
              </div>
              
              <button type="submit" class="btn btn-primary btn-block">注册</button>
            </form>
          </div>
        </div>
      </div>
      
      <div class="mt-20 text-center">
        <p>或通过以下方式登录</p>
        <div class="flex flex-center gap-20 mt-10">
          <button class="btn btn-outline">
            <i class="fab fa-apple"></i> Apple
          </button>
          <button class="btn btn-outline">
            <i class="fab fa-weixin"></i> 微信
          </button>
        </div>
      </div>
      
      <div class="mt-20 text-center">
        <p style="font-size: 12px; color: var(--text-secondary);">注册或登录代表您同意我们的<a href="#" class="text-primary">服务条款</a>和<a href="#" class="text-primary">隐私政策</a></p>
      </div>
    </div>
  </div>
  
  <style>
    /* Login page specific styles */
    .nav-tabs {
      display: flex;
      list-style: none;
      padding: 0;
      margin: 0 0 20px 0;
      border-bottom: 1px solid var(--border-color);
    }
    
    .nav-tabs li {
      flex: 1;
      text-align: center;
    }
    
    .nav-tabs li a {
      display: block;
      padding: 10px;
      color: var(--text-color);
      text-decoration: none;
    }
    
    .nav-tabs li.active a {
      color: var(--primary-color);
      border-bottom: 2px solid var(--primary-color);
    }
    
    .tab-content {
      padding: 15px 0;
    }
    
    .tab-pane {
      display: none;
    }
    
    .tab-pane.active {
      display: block;
    }
  </style>
  
  <script>
    // Simple tab switching
    document.addEventListener('DOMContentLoaded', function() {
      const tabs = document.querySelectorAll('.nav-tabs li');
      tabs.forEach(tab => {
        tab.addEventListener('click', function(e) {
          e.preventDefault();
          // Remove active class from all tabs
          tabs.forEach(t => t.classList.remove('active'));
          // Add active class to clicked tab
          this.classList.add('active');
          
          // Hide all tab panes
          const panes = document.querySelectorAll('.tab-pane');
          panes.forEach(pane => pane.classList.remove('active'));
          
          // Show relevant tab pane
          const target = this.querySelector('a').getAttribute('href');
          document.querySelector(target).classList.add('active');
        });
      });
    });
  </script>
  
  <script src="js/app.js"></script>
</body>
</html>
